import Mock from 'mockjs';

// 模拟头像上传接口
Mock.mock('/api/upload-avatar', 'post', (options) => {
    const formData = new FormData();
    formData.append('avatar', options.body);
    // 模拟成功响应
    return {
        code: 200,
        message: '头像上传成功',
        // 生成模拟头像 URL
        avatarUrl: Mock.Random.image('100x100', '#894FC4', '#FFF', 'Mock Avatar')
    };
});